package com.sc.nft.entity.vo;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class CityServerCentreExportVO {


    @ApiModelProperty("用户账号")
    private String userTel;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("城市服务中心名称")
    private String cityServerCenterName;

    @ApiModelProperty("身份证")
    private String idCard;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("团队有效交易人数")
    private Integer validatedUser;

    @ApiModelProperty("持仓成本")
    private String teamCost;

    @ApiModelProperty("团队业绩")
    private String teamPerformanceThisMonth;

    @ApiModelProperty("类型名称")
    private String typeName;

    public void setTeamPerformanceThisMonth(BigDecimal teamPerformanceThisMonth) {
        if (ObjectUtil.isEmpty(teamPerformanceThisMonth)) {
            teamPerformanceThisMonth=BigDecimal.ZERO;
        }
        this.teamPerformanceThisMonth = StrUtil.format("{} {}","¥",teamPerformanceThisMonth.setScale(2,BigDecimal.ROUND_DOWN).toPlainString());
    }

    public void setTeamCost(BigDecimal teamCost) {
        if (ObjectUtil.isEmpty(teamCost)) {
            teamCost=BigDecimal.ZERO;
        }
        this.teamCost =StrUtil.format("{} {}","¥", teamCost.setScale(2,BigDecimal.ROUND_DOWN).toPlainString());
    }

}
